package pierwszy.wordPressPageObjects.wordPressTcs;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;

import pierwszy.wordPressPageObjects.AdminLoginPage;
import pierwszy.wordPressPageObjects.AllPostsPage;

@Test
public class TestAddNewPostUsingPageObjects {
	public void addNewPost(){
		WebDriver driver = new FirefoxDriver();
		//AdminLoginPage loginPage = PageFactory.initElements(driver, AdminLoginPage.class);
		AdminLoginPage loginPage = new AdminLoginPage(driver).get();
		AllPostsPage allPostsPage = loginPage.login();
		allPostsPage.createANewPost("Create New Post Using PageObjects", "It's good to use PageObjects");
	}
}
